/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DiagramObjects;

import java.util.ArrayList;

/**
 *
 * @author Administrator
 */
public class DiagramObjects {
  
   private ArrayList<DiagramObject> GeometricObjects;
  public DiagramObjects()
  {
    GeometricObjects = new ArrayList<DiagramObject>();
  }
  
  public void AddGeometricObjectToPanel(DiagramObject obj)
	{
		
		GeometricObjects.add(obj);
		System.out.println("Dodawanie linii: ");
		//((Line)GeometricObjects.get(GeometricObjects.size()-1)).Print();
	}
	
	/**
	 * pobiera okrelony obiekt z panelu
	 * @param okre
	 */
	public DiagramObject GetGeometricbjectFromPanel(int which)
	{
		return GeometricObjects.get(which);
	}
	
	/**
	 * zwraca ostatni z listy obiekt panelu
	 */
	public DiagramObject GetLastGeometricbjectFromPanel()
	{
		return GeometricObjects.get(GeometricObjects.size()-1);
	}
	
	/**
	 * 
	 * @return
	 */
	public ArrayList<DiagramObject> GetGeometricObjectsOnPanel()
	{
		return GeometricObjects;
	}
	
	/**
	 * zwraca ilosc geometrycznych obiektow
	 */
	
	public int GetSize()
	{
		return GeometricObjects.size();
	}
}